package com.letao.rest.service.impl;

import com.letao.common.pojo.LetaoResult;
import com.letao.rest.dao.JedisClient;
import com.letao.rest.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/1/19.
 */
@Service
public class RedisServiceImpl implements RedisService {

    @Autowired
    private JedisClient jedisClient;

    @Value("${REDIS_CONTENT_KEY}")
    private String REDIS_CONTENT_KEY;

    @Override
    public LetaoResult syncContent(long contentCategoryId) {
        jedisClient.hdel(REDIS_CONTENT_KEY, contentCategoryId + "");
        return LetaoResult.ok();
    }
}
